/**
 * Define the interface of the ValidatingImageService
 * 
 * @author Dafei.Shi
 * @since May 29th, 2008 
 * Copyright 2008 Hilaver Ltd. All rights reserved.
 */

package com.hilaver.dzmis.service;

import java.awt.image.BufferedImage;

public interface IValidatingImageService {

	public final static int IMAGE_WIDTH = 60;

	public final static int IMAGE_HEIGHT = 20;

	public final static int RANDOM_CODE_LENGHT = 4;

	public final static int LINE_MAX_LENGH = 12;

	public final static int LINE_COUNT = 16;
	
	public final static String FONT_TYPE = "Times New Roman";
	
	public final static int FONT_SIZE = 18;

	public final static char C[] = new char[] { 'a', 'b', 'c', 'd', 'e', 'f',
			'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p', 'q', 'r', 's',
			't', 'u', 'v', 'w', 'x', 'y', 'z', 'A', 'B', 'C', 'D', 'E', 'F',
			'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R', 'S',
			'T', 'U', 'V', 'W', 'X', 'Y', 'Z', '0', '1', '2', '3', '4', '5',
			'6', '7', '8', '9' };

	/**
	 * Get the validating code corresponding to validating image.
	 * @return - the four bits String including A ~ Z, a ~ z and 0 ~ 9. 
	 */
	public String getValidatingCode();

	/**
	 * Get the validating image corresponding to the random code.
	 * And also, there are several lines on the image. 
	 *   
	 * @return - java.awt.image.BufferedImage
	 */
	public BufferedImage generateImage();
}
